import {
  createRouter,
  createWebHashHistory,
  RouteRecordRaw
} from 'vue-router'

// @ts-ignore
import Home from '@/views/homePage.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'index',
    redirect: '/Home'
  },
  {
    path: '/Home',
    title:'生活常用单词',
    name: 'Home',
    component: Home
  },
  {
    path: '/common',
    title:'A-Z 单词组',
    name: 'common',
    component: () => import("../views/CommonPage.vue"),
  },
  {
    path: '/SentencePatterns',
    title:'常用句型',
    name: 'SentencePatterns',
    component: () => import("../views/SentencePatterns.vue"),
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
